import request from '@/utils/request'
import user from "@/store/modules/user";

// 查询房屋中介表列表
export function listMediumAllocat(houseId) {
  return request({
    url: '/domain/medium/list/' + houseId,
    method: 'get',
  })
}

// 查询房屋中介列表
export function listMedium(query) {
  return request({
    url: '/domain/medium/list',
    method: 'get',
    params: query
  })
}

// 查询房屋中介表详细
export function getMedium(userId) {
  return request({
    url: '/domain/medium/' + userId,
    method: 'get'
  })
}

// 新增房屋中介表
export function addMedium(data) {
  return request({
    url: '/domain/medium',
    method: 'post',
    data: data
  })
}

// 修改房屋中介表
export function updateMedium(userId, houseId) {
  return request({
    url: '/domain/medium/' + userId + "/" + houseId,
    method: 'put',
  })
}

// 删除房屋中介表
export function delMedium(userId) {
  return request({
    url: '/domain/medium/' + userId,
    method: 'delete'
  })
}
